package com.tengol.demo.design.pattern.structural.flyweight.demo1;

/**
 * Flyweight
 *
 * @author dongrui
 * @date 2019/03/07
 */
public abstract class Flyweight {
    private String intrinsic;
    protected final String extrinsic;
    //接受外部状态
    public Flyweight(String extrinsic) {
        this.extrinsic = extrinsic;
    }
    //根据外部状态进行逻辑处理
    public abstract void operate();

    public String getIntrinsic() {
        return intrinsic;
    }

    public void setIntrinsic(String intrinsic) {
        this.intrinsic = intrinsic;
    }
}
